<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Faiss: faiss::PolysemousTraining Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Faiss
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacefaiss.html">faiss</a></li><li class="navelem"><a class="el" href="structfaiss_1_1PolysemousTraining.html">PolysemousTraining</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="structfaiss_1_1PolysemousTraining-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">faiss::PolysemousTraining Struct Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>optimizes the order of indices in a <a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a>  
 <a href="structfaiss_1_1PolysemousTraining.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="PolysemousTraining_8h_source.html">PolysemousTraining.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for faiss::PolysemousTraining:</div>
<div class="dyncontent">
 <div class="center">
  <img src="structfaiss_1_1PolysemousTraining.png" usemap="#faiss::PolysemousTraining_map" alt=""/>
  <map id="faiss::PolysemousTraining_map" name="faiss::PolysemousTraining_map">
<area href="structfaiss_1_1SimulatedAnnealingParameters.html" title="parameters used for the simulated annealing method " alt="faiss::SimulatedAnnealingParameters" shape="rect" coords="0,0,219,24"/>
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:aeb5a523056697934972f95fd428f61ef"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1PolysemousTraining.html#aeb5a523056697934972f95fd428f61ef">Optimization_type_t</a> { <b>OT_None</b>, 
<a class="el" href="structfaiss_1_1PolysemousTraining.html#aeb5a523056697934972f95fd428f61efa4f1f59a0027c1662a7aaf66f2a78fb23">OT_ReproduceDistances_affine</a>, 
<a class="el" href="structfaiss_1_1PolysemousTraining.html#aeb5a523056697934972f95fd428f61efa514d33b85a240091cdd7b8efaf66a0b5">OT_Ranking_weighted_diff</a>
 }</td></tr>
<tr class="separator:aeb5a523056697934972f95fd428f61ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a995374ba2f0bc2738edae72ca9142f82"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1PolysemousTraining.html#a995374ba2f0bc2738edae72ca9142f82">optimize_pq_for_hamming</a> (<a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a> &amp;pq, size_t n, const float *x) const </td></tr>
<tr class="separator:a995374ba2f0bc2738edae72ca9142f82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ac61389b6fcc7f98e998d9d0cc2664a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0ac61389b6fcc7f98e998d9d0cc2664a"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1PolysemousTraining.html#a0ac61389b6fcc7f98e998d9d0cc2664a">optimize_ranking</a> (<a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a> &amp;pq, size_t n, const float *x) const </td></tr>
<tr class="memdesc:a0ac61389b6fcc7f98e998d9d0cc2664a"><td class="mdescLeft">&#160;</td><td class="mdescRight">called by optimize_pq_for_hamming <br/></td></tr>
<tr class="separator:a0ac61389b6fcc7f98e998d9d0cc2664a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6989e2b573d4368e7f863edbbb2f00b8"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6989e2b573d4368e7f863edbbb2f00b8"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structfaiss_1_1PolysemousTraining.html#a6989e2b573d4368e7f863edbbb2f00b8">optimize_reproduce_distances</a> (<a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a> &amp;pq) const </td></tr>
<tr class="memdesc:a6989e2b573d4368e7f863edbbb2f00b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">called by optimize_pq_for_hamming <br/></td></tr>
<tr class="separator:a6989e2b573d4368e7f863edbbb2f00b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a46f871a4914a2ac992aa4a4895de79e5"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a46f871a4914a2ac992aa4a4895de79e5"></a>
<a class="el" href="structfaiss_1_1PolysemousTraining.html#aeb5a523056697934972f95fd428f61ef">Optimization_type_t</a>&#160;</td><td class="memItemRight" valign="bottom"><b>optimization_type</b></td></tr>
<tr class="separator:a46f871a4914a2ac992aa4a4895de79e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71013b1d05ce60b41159c753715af50e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a71013b1d05ce60b41159c753715af50e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>ntrain_permutation</b></td></tr>
<tr class="separator:a71013b1d05ce60b41159c753715af50e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45724bac8ffec6453e2dd01294e605d7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a45724bac8ffec6453e2dd01294e605d7"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>dis_weight_factor</b></td></tr>
<tr class="separator:a45724bac8ffec6453e2dd01294e605d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f5d6c6399aebaa3cfccfa5f00b24283"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0f5d6c6399aebaa3cfccfa5f00b24283"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><b>log_pattern</b></td></tr>
<tr class="separator:a0f5d6c6399aebaa3cfccfa5f00b24283"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_structfaiss_1_1SimulatedAnnealingParameters')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="structfaiss_1_1SimulatedAnnealingParameters.html">faiss::SimulatedAnnealingParameters</a></td></tr>
<tr class="memitem:a217f2edf539c4c5b7acb9b54129ba024 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a217f2edf539c4c5b7acb9b54129ba024"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>init_temperature</b></td></tr>
<tr class="separator:a217f2edf539c4c5b7acb9b54129ba024 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa504c46bab0faa2ce816df8294b55ce5 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa504c46bab0faa2ce816df8294b55ce5"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><b>temperature_decay</b></td></tr>
<tr class="separator:aa504c46bab0faa2ce816df8294b55ce5 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a782872c517c1a0b8211c6179f60e6d8e inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a782872c517c1a0b8211c6179f60e6d8e"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>n_iter</b></td></tr>
<tr class="separator:a782872c517c1a0b8211c6179f60e6d8e inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adf0dc7ec9cf5cfb6b043b2610e2beff4 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adf0dc7ec9cf5cfb6b043b2610e2beff4"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>n_redo</b></td></tr>
<tr class="separator:adf0dc7ec9cf5cfb6b043b2610e2beff4 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6b87ff7698b724937bc00c0845a71ad inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6b87ff7698b724937bc00c0845a71ad"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>seed</b></td></tr>
<tr class="separator:ae6b87ff7698b724937bc00c0845a71ad inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0bbe4df85cb764234d6a700d0db00c4 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0bbe4df85cb764234d6a700d0db00c4"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>verbose</b></td></tr>
<tr class="separator:ae0bbe4df85cb764234d6a700d0db00c4 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a92240b3cfe75d58c802dbedf4e4c2e inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1a92240b3cfe75d58c802dbedf4e4c2e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>only_bit_flips</b></td></tr>
<tr class="separator:a1a92240b3cfe75d58c802dbedf4e4c2e inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a66766c4a8ca802c99a4c1315e197d9 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2a66766c4a8ca802c99a4c1315e197d9"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>init_random</b></td></tr>
<tr class="separator:a2a66766c4a8ca802c99a4c1315e197d9 inherit pub_attribs_structfaiss_1_1SimulatedAnnealingParameters"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>optimizes the order of indices in a <a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a> </p>

<p>Definition at line <a class="el" href="PolysemousTraining_8h_source.html#l00121">121</a> of file <a class="el" href="PolysemousTraining_8h_source.html">PolysemousTraining.h</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a class="anchor" id="aeb5a523056697934972f95fd428f61ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="structfaiss_1_1PolysemousTraining.html#aeb5a523056697934972f95fd428f61ef">faiss::PolysemousTraining::Optimization_type_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="aeb5a523056697934972f95fd428f61efa4f1f59a0027c1662a7aaf66f2a78fb23"></a>OT_ReproduceDistances_affine</em>&nbsp;</td><td class="fielddoc">
<p>default </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="aeb5a523056697934972f95fd428f61efa514d33b85a240091cdd7b8efaf66a0b5"></a>OT_Ranking_weighted_diff</em>&nbsp;</td><td class="fielddoc">
<p>same as _2, but use rank of y+ - rank of y- </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="PolysemousTraining_8h_source.html#l00123">123</a> of file <a class="el" href="PolysemousTraining_8h_source.html">PolysemousTraining.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a995374ba2f0bc2738edae72ca9142f82"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void faiss::PolysemousTraining::optimize_pq_for_hamming </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structfaiss_1_1ProductQuantizer.html">ProductQuantizer</a> &amp;&#160;</td>
          <td class="paramname"><em>pq</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const float *&#160;</td>
          <td class="paramname"><em>x</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>reorder the centroids so that the Hamming distace becomes a good approximation of the SDC distance (called by train) </p>

<p>Definition at line <a class="el" href="PolysemousTraining_8cpp_source.html#l00934">934</a> of file <a class="el" href="PolysemousTraining_8cpp_source.html">PolysemousTraining.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this struct was generated from the following files:<ul>
<li>/data/users/hoss/faiss/<a class="el" href="PolysemousTraining_8h_source.html">PolysemousTraining.h</a></li>
<li>/data/users/hoss/faiss/<a class="el" href="PolysemousTraining_8cpp_source.html">PolysemousTraining.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.5
</small></address>
</body>
</html>
